<template>
  <view class="wrap">
    <web-view src="/static/html/map.html" />
    <!-- <div style="position: absolute;left: 20px;top: 100px;background: red;z-index: 1;">123</div> -->
  </view>
</template>

<script setup lang="ts">
// #ifdef MP-WEIXIN
import { useShare } from '@/hooks';
// #endif
import { useUserStore } from '@/store';

// #ifdef MP-WEIXIN
// 分享使用示例
const { onShareAppMessage, onShareTimeline } = useShare({
  title: '首页',
  path: 'pages/tab/home/index',
  imageUrl: '',
});
onShareAppMessage();
onShareTimeline();
// #endif

const title = ref<string>();
title.value = import.meta.env.VITE_APP_TITLE;

const showAgreePrivacy = ref(false);

const userStore = useUserStore();
console.log('userStore.user_name', userStore.user_name);

// 同意隐私协议
function handleAgree() {
  console.log('同意隐私政策');
}

// 打开github
function toGithub() {
  if (window?.open) {
    window.open('https://github.com/oyjt/uniapp-vue3-template');
  }
  else {
    uni.$u.toast('请使用浏览器打开');
  }
}
</script>
